-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP, ECO-4787] Prototype interception proxy #1816
Draft
lawrence-forooghian
wants to merge
2
commits into
main
Choose a base branch
from
ECO-4787-prototype-interception-proxy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
July 16, 2024 17:50
Inactive
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
July 16, 2024 20:49
66c568e
to
af3a497
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
July 16, 2024 20:49
Inactive
lawrence-forooghian
changed the title
[WIP] Unified test suite: Prototype interception proxy
[WIP, ECO-4787] Unified test suite: Prototype interception proxy
Jul 16, 2024
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
July 25, 2024 09:39
af3a497
to
bf8a5ce
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
July 25, 2024 09:40
Inactive
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
July 25, 2024 10:31
bf8a5ce
to
cf1a729
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
July 25, 2024 10:32
Inactive
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
July 29, 2024 09:30
cf1a729
to
656f5b7
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
July 29, 2024 09:31
Inactive
lawrence-forooghian
changed the title
[WIP, ECO-4787] Unified test suite: Prototype interception proxy
[WIP, ECO-4787] Prototype interception proxy
Jul 29, 2024
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
July 29, 2024 11:48
656f5b7
to
14d00c3
Compare
lawrence-forooghian
changed the base branch from
main
to
upgrade-prettier-and-run-on-everything
July 29, 2024 11:48
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
July 29, 2024 11:49
Inactive
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
July 30, 2024 07:49
14d00c3
to
695f1e5
Compare
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
July 30, 2024 10:11
577bd41
to
aa7871c
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
July 30, 2024 10:12
Inactive
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
July 30, 2024 10:25
aa7871c
to
67a1a7f
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
July 30, 2024 10:26
Inactive
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
July 30, 2024 10:29
67a1a7f
to
86297af
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
July 30, 2024 10:30
Inactive
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
July 30, 2024 13:28
86297af
to
bdc7d36
Compare
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
July 30, 2024 13:29
Inactive
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
September 24, 2024 18:30
bdc7d36
to
7d07ad8
Compare
This comment was marked as spam.
This comment was marked as spam.
github-actions
bot
temporarily deployed
to
staging/pull/1816/features
September 24, 2024 18:30
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1816/bundle-report
September 24, 2024 18:30
Inactive
github-actions
bot
temporarily deployed
to
staging/pull/1816/typedoc
September 24, 2024 18:31
Inactive
This adds a client for the interception proxy, and passes all test WebSocket traffic through the proxy. It does not currently perform any modifications to the WebSocket traffic (I’ll add a subsequent commit where we convert a handful of tests to use the proxy instead of private APIs for intercepting and modifying Realtime protocol messages). This is very much a prototype and work in progress, hence all the TODOs. The API of InterceptionProxyClient will probably evolve as we convert more tests to use it. I’ve also added an NPM script called test:playwright:open-browser script, which lets you open a headed browser which is configured to use the interception proxy. Useful for local debugging of browser tests. Here’s how to run the tests locally on macOS: One-time setup: 1. Install the interception proxy’s Python dependencies (see readme of [1]) 2. Run `npm install` to install the interception proxy 3. Generate mitmproxy TLS certificate: `npx --package interception-proxy generate-mitmproxy-certs` Running the tests: 1. In a separate terminal, run the interception proxy (after each test run, you’ll need to kill this and run it again, which is a bit annoying; it would be good to fix this): `npx interception-proxy` 2. Run the tests: - Node: `NODE_EXTRA_CA_CERTS=~/.mitmproxy/mitmproxy-ca-cert.pem npm run test:node` - Browser: The easiest one is Firefox since it doesn’t require you to install any CA certificates: `PLAYWRIGHT_BROWSER=firefox npm run test:playwright` [1] https://github.com/ably-labs/interception-proxy
I’ve changed these tests to use the interception proxy instead of private API for intercepting and injecting Realtime protocol messages, as an example of how to use the proxy and its test suite client class.
lawrence-forooghian
force-pushed
the
ECO-4787-prototype-interception-proxy
branch
from
September 24, 2024 18:40
7d07ad8
to
7d2977b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As described in this internal RFC. Uses https://github.com/ably-labs/interception-proxy. See commit messages for more details.